package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelTarget;

import java.io.Serializable;

/**
 * <p>
 * lg_邀请码
 * </p>
 *
 * @author stylefeng123
 * @since 2018-01-31
 */
@TableName("lg_invitation_code")
@ExcelTarget("courseEntity")
public class InvitationCode extends Model<InvitationCode> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 组织id
     */
    private Integer deptid;
    /**
     * 邀请码
     */
    @Excel(name = "邀请码")
    private Integer code;
    /**
     * 是否可用
     */
    @Excel(name = "是否可用", replace = {"可用_true", "不可用_false"})
    private Boolean available;
    /**
     * 创建时间
     */
    private Date createtime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDeptid() {
        return deptid;
    }

    public void setDeptid(Integer deptid) {
        this.deptid = deptid;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "InvitationCode{" +
                "id=" + id +
                ", deptid=" + deptid +
                ", code=" + code +
                ", available=" + available +
                ", createtime=" + createtime +
                "}";
    }
}
